{% extends "base.html" %}


    # estructura:
    # franges_tot: [ , , , , , ]
    # impartir_tot =
    #   [
    #    impartirFranja =  
    #  		( dia , 
    #			[ impartir_franja = 
    #				[ imparticions = [ imparticio, ... ] , ... ] 
    #			]
    #		)  , ...
    #   ]
    #
 
{% block content  %}
	<h1>Horari professor: {{ professor }} </h1>
	
	<div class="setmana"  style="float:left">
	
		<div class="calendari">		   
		</div>
		{% for dia in calendari %}
			<div class="calendari">
			   {{ dia }}
			</div>
		{% endfor %}
	
		{% for impartir_franja in impartir_tot %}
			{% for imparticions in impartir_franja %}
				<div class="imparticions" {%if forloop.first %} style="clear:both;" {% endif %}>
					{% for assignatura, grup, aula, pk, color, color2, resum, esGuardia in imparticions %}
						<div class="imparticio" >
							{%if esGuardia%}
								<div style="border: 1px solid;">
								<div style="text-align: right;">
								 -Guardia- <a style="color:#444444;" href="/presencia/esborraGuardia/{{pk}}">[ x ]</a>
								</div>
							{%endif%}
							<div style="background-color:{{color}}">
							{{ assignatura }} {{ aula }}
							<br/>{{ grup }} 
							<br/>
							</div>
							<div style="background-color:{{color2}}">
							{%if grup %}
								<a href="/presencia/passaLlista/{{pk}}">{{ resum }}</a>														
							{%endif%}
							</div>
							{%if esGuardia%}
								</div>
							{%endif%}
						</div>
					{% endfor %}
				</div>				
			{% endfor %}
		{% endfor %}		

		<div style="clear: both;"></div>
		<div class="calendari">		   
		</div>
		{% for dia in calendari %}
			<div class="calendari">			   
			   <a style="color:#444444" href="/presencia/afegeixGuardia/{{dia}}"> +guardia</a>
			</div>
		{% endfor %}
			
		<div style="clear: both;"></div>
		<div class="menucontextual" style="">
			<ul>
			{% for  professor, moment, altre_data in altres_moments %}
			<li>
				<a href="/presencia/mostraImpartir/{{altre_data.year}}/{{altre_data.month}}/{{altre_data.day}}/">{{moment}}</a>
			</li>
			{% endfor %}
			</ul>	
		</div>

	</div> <!--setmana-->

	<div style="clear: both;"></div>
	
	
	
{% endblock %}





